//
// This file is part of an OMNeT++/OMNEST simulation example.
//
// Copyright (C) 1992-2008 Andras Varga
//
// This file is distributed WITHOUT ANY WARRANTY. See the file
// `license' for details on this and other legal matters.
//

//
// Model of the network, consisting of several clients, a server and a cloud
//
network TelnetNet2
{
    parameters:
        int numClients @prompt("Number of clients") = default(4);
    submodules:
        server: TelnetServer {
            parameters:
                @display("p=426,178");
        }
        cloud: Cloud {
            parameters:
                @display("p=274,182");
            gates:
                g[numClients+3];
        }
        extClient: ExtAndroidClient {
            parameters:
                addr = 1;
                srvAddr = 0;
                
                @display("p=102,92;t=Run the simulation\\, then start:\ntelnet localhost 4242\nThen if on Unix\\, type:\nCtrl+] ``mode character''");
        }
        extClient2: ExtAndroidClient {
            parameters:
                addr = 2;
                srvAddr = 0;
                
                @display("p=102,92;t=Run the simulation\\, then start:\ntelnet localhost 4242\nThen if on Unix\\, type:\nCtrl+] ``mode character''");
        }
        client[numClients]: TelnetClient {
            parameters:
                addr = 3+index;
                srvAddr = 0;
                @display("p=102,162,col");
        }
    connections:
        server.g <--> cloud.g[0];
        extClient.g <--> cloud.g[1];
        extClient2.g <--> cloud.g[2];
        client[i].g <--> cloud.g[i+3] for i=0..numClients-1;
}


